home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
CIncludes
/
NVRAM.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-01
|
3KB
|
134 lines
/*
File: NVRAM.h
Contains: NVRAM FPI data structures and function prototypes
Version: Technology:
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __NVRAM__
#define __NVRAM__
#ifndef __TYPES__
#include <Types.h>
#endif
#ifndef __KERNEL__
#include <Kernel.h>
#endif
#ifndef __OSUTILS__
#include <OSUtils.h>
#endif
#ifndef __ERRORS__
#include <Errors.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if FOR_SYSTEM8_PREEMPTIVE
/*
NVRAM Error Return Code
*/
enum {
NVRAMnoErr = noErr,
NVRAMInvalidParm = paramErr,
NVRAMReadFailed = readErr,
NVRAMWriteFailed = writErr,
NVRAMServiceFailed = statusErr,
NVRAMInstallFailed = dInstErr
};
/*
NVRAM Request Code
*/
enum {
kNVRAMpramInitMsg = 1,
kNVRAMpramReadMsg = 2, /* This include read access to System Parameters and XPRAM */
kNVRAMpramWriteMsg = 3, /* This include write access to System Parameters and XPRAM*/
kNVRAMrpramReadMsg = 4,
kNVRAMrpramWriteMsg = 5,
kNVRAMReadMsg = 6,
kNVRAMWriteMsg = 7,
kNVRAMOpenFirmwareReadMsg = 8,
kNVRAMOpenFirmwareWriteMsg = 9,
kNVRAMNameRegistryReadMsg = 10,
kNVRAMNameRegistryWriteMsg = 11,
kNVRAMRqstLimit = 12
};
/*
Function : NVRAMFPIInit
Description : Find the Object Id property in the family-tree
This is essential for message passing between FPI and kernel server task.
This is the main entry for the NVRAMFPI library, and will be called when
FPI library is loaded by the CFM.
*/
extern OSStatus NVRAMFPIInit(void );
/*
Function : NVRAMAccessSync
Description : This is common entry point for synchronous access to NVRAM hardware.
This is an export in the NVRAMFPI library.
*/
extern OSStatus NVRAMAccessSync(UInt32 offset, Byte *accessData, ByteCount sizeofAccess, UInt32 typeOfRequest);
/*
Function : NVRAMAccessAsync
Description : This is common entry point for asynchronous access to NVRAM hardware
This is an export in the NVRAMFPI library.
*/
extern OSStatus NVRAMAccessAsync(UInt32 offset, Byte *accessData, ByteCount sizeofAccess, void *someTypeofNotification, UInt32 typeOfRequest, ByteCount *replySize, MessageID *msgID);
/*
Test APIs or SPIs
*/
extern pascal OSErr myInitUtil(void );
extern pascal SysPPtr myGetSysPPtr(void );
extern pascal OSErr myWriteParam(void );
extern pascal OSErr myWriteXPRAM(UInt32 offset, Byte *accessdata, ByteCount numberOfBytes);
extern pascal OSErr myReadXPRAM(UInt32 offset, Byte *accessdata, ByteCount numberOfBytes);
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
#ifdef __cplusplus
}
#endif
#endif /* __NVRAM__ */